from pydantic import Field

from recruit.domain.models.base import Base
from recruit.domain.models.resume_id import ResumeInfoId
from recruit.domain.models.user_id import UserId


class BaseResumeInfo(Base):
    residence: str | None = Field(None, description='Место проживания')
    name: str | None = Field(None, description='Имя')
    patronymic: str | None = Field(None, description='Отчество')
    surname: str | None = Field(None, description='Фамилия')


class ResumeInfoCreate(BaseResumeInfo):
    name: str = Field(..., description='Имя')
    patronymic: str = Field(..., description='Отчество')
    surname: str = Field(..., description='Фамилия')


class ResumeInfoResult(ResumeInfoCreate):
    id: ResumeInfoId = Field(
        ...,
        description='Уникальный идентификатор информации о пользователе в '
                    'резюме'
    )


class ResumeInfoUpdate(BaseResumeInfo):
    pass
